export default {
    methods: {
        //主表格方法传递
        getMainTable() {
            return this.$refs['MainTable']
        },
        loadData(params) {
            return this.getMainTable().loadData(params)
        },

        reload() {
            this.getMainTable().loadData()
        },
        setData(data) {
            this.getMainTable().setData(data)
        },
        getData() {
            return this.getMainTable().getData()
        },
        getCurrentRow() {
            return this.getMainTable().getCurrentRow()
        },
        getSelection() {
            return this.getMainTable().getSelection()
        },
        /* 原生方法传递 */
        doLayout() {
            this.getMainTable().doLayout()
        },
        setCurrentRow(row, expanded) {
            this.getMainTable().setCurrentRow(row, expanded)
        },
        clearSelection() {
            this.getMainTable().clearSelection()
        },

        toggleRowSelection(row, selected) {
            this.getMainTable().toggleRowSelection(row, selected)
        },
        toggleAllSelection() {
            this.getMainTable().toggleAllSelection()
        },
        toggleRowExpansion(row, selected) {
            this.getMainTable().toggleRowExpansion(row, selected)
        },
        sort(column, type) {
            this.getMainTable().sort(column, type)
        },

        clearSort() {
            this.getMainTable().clearSort()
        },
    }
}